﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DoAdminType.aspx.cs" Inherits="webadmin_DoAdminType" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>无标题页</title>
    <link type="text/css" href="css/style.css" rel="stylesheet" />
    <script type="text/javascript" src="js/jquery.js"></script>
    <script type="text/javascript" src="js/lib.js"></script>
    <script type="text/javascript">
        $(function () { BindBtn(); $("#txtName").focus(); top.ResetFrmAutoHeight(); });
        function CheckInput() {
            var name = $("#txtName");
            if ($.isEmpty(name.val())) {
                alert("请输入权限名称！");
                name.focus();
                return false;
            }
            if (!$.RealLengthBetween(name.val(), 1, 30)) {
                alert("权限名称长度不能超过30个字符，请重新输入！");
                name.focus();
                return false;
            }
            return true;
        }
        function ResetPage() {
            top.$("#DialogIframe").dialog('close');
            var btn = top.$("#mainFrame").contents().find("#btnReset");
            $(btn).click();
        }
    </script>
    <style type="text/css">
    ul,li{ list-style-type:none;}
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div id="conBox">
        <table class="dialogTable">
            <tr>
                <th>
                    权限名称：
                </th>
                <td>
                    <asp:TextBox ID="txtName" runat="server" CssClass="txtbox"></asp:TextBox>
                    <span>*</span><asp:HiddenField ID="hfAdminFeatures" runat="server" />
                </td>
            </tr>
            <tr>
                <th>
                </th>
                <td>
                    <span>长度为1-30个字符，由任意字符组成。</span>
                </td>
            </tr>
            <tr>
                <td>
                    权限选择：
                </td>
                <td>
                    <ul>
                    <asp:Repeater ID="rptFeatures" runat="server" OnItemDataBound="rptFeatures_ItemDataBound">
                        <ItemTemplate>
                        <li<%#GetStyle(Eval("ParentID")) %>>
                            <asp:CheckBox ID="chkID" runat="server" Text='<%#Eval("Name") %>' />
                            <asp:Label runat="server" Text='<%#Eval("Name") %>' ID="lblName" style="color:#4b4646;"></asp:Label>
                            <asp:HiddenField ID="hfFeatures" runat="server" Value='<%#Eval("Features") %>' />
                        </li>
                        </ItemTemplate>
                    </asp:Repeater>
                    </ul>
                </td>
            </tr>
            <tr>
                <td style="line-height: 30px;" colspan="2" align="center">
                    <asp:Button ID="btnSubmit" runat="server" Text="提 交" OnClientClick="return CheckInput();"
                        OnClick="btnSubmit_Click" CssClass="button" />
                    <input type="reset" class="button" value="关 闭" onclick="top.$('#DialogIframe').dialog('close');" />
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
